func findNumberOfLIS(nums []int) int {
	mLen, ans := 0, 0
	dp := make([]int, len(nums))
	cnt := make([]int, len(nums))
	for i := 0; i < len(nums); i++ {
		dp[i] = 1
		cnt[i] = 1
		for j := 0; j < i; j++ {
			//遍历i前面所有满足num[i]>num[j]的j
			//遍历i,O(n),每次i遍历前面的j,花费O(n),总的复杂度为O(n^2)
			if nums[j] < nums[i] {
				if dp[i] < dp[j]+1 {
					dp[i] = dp[j] + 1
					cnt[i] = cnt[j]
				} else if dp[i] == dp[j]+1 {
					cnt[i] += cnt[j]
				}
			}
		}
	}
	for i := 0; i < len(nums); i++ {
		if dp[i] > mLen {
			mLen = dp[i]
			ans = cnt[i]
		} else if dp[i] == mLen {
			ans += cnt[i]
		}
	}
	return ans
}
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}
